package com.ruoyi.wcf.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wcf.mapper.WcfNoticeManageMapper;
import com.ruoyi.wcf.domain.WcfNoticeManage;
import com.ruoyi.wcf.service.IWcfNoticeManageService;

/**
 * 公告管理Service业务层处理
 *
 * @author LCL
 * @date 2022-04-06
 */
@Service
public class WcfNoticeManageServiceImpl implements IWcfNoticeManageService
{
    @Autowired
    private WcfNoticeManageMapper wcfNoticeManageMapper;

    /**
     * 查询公告管理
     *
     * @param noticeId 公告管理主键
     * @return 公告管理
     */
    @Override
    public WcfNoticeManage selectWcfNoticeManageByNoticeId(Long noticeId)
    {
        return wcfNoticeManageMapper.selectWcfNoticeManageByNoticeId(noticeId);
    }

    /**
     * 查询公告管理列表
     *
     * @param wcfNoticeManage 公告管理
     * @return 公告管理
     */
    @Override
    public List<WcfNoticeManage> selectWcfNoticeManageList(WcfNoticeManage wcfNoticeManage)
    {
        return wcfNoticeManageMapper.selectWcfNoticeManageList(wcfNoticeManage);
    }

    /**
     * 新增公告管理
     *
     * @param wcfNoticeManage 公告管理
     * @return 结果
     */
    @Override
    public int insertWcfNoticeManage(WcfNoticeManage wcfNoticeManage)
    {
        wcfNoticeManage.setCreateAt(new Date());
        return wcfNoticeManageMapper.insertWcfNoticeManage(wcfNoticeManage);
    }

    /**
     * 修改公告管理
     *
     * @param wcfNoticeManage 公告管理
     * @return 结果
     */
    @Override
    public int updateWcfNoticeManage(WcfNoticeManage wcfNoticeManage)
    {
        wcfNoticeManage.setUpdateAt(new Date());
        return wcfNoticeManageMapper.updateWcfNoticeManage(wcfNoticeManage);
    }

    /**
     * 批量删除公告管理
     *
     * @param noticeIds 需要删除的公告管理主键
     * @return 结果
     */
    @Override
    public int deleteWcfNoticeManageByNoticeIds(Long[] noticeIds)
    {
        return wcfNoticeManageMapper.deleteWcfNoticeManageByNoticeIds(noticeIds);
    }

    /**
     * 删除公告管理信息
     *
     * @param noticeId 公告管理主键
     * @return 结果
     */
    @Override
    public int deleteWcfNoticeManageByNoticeId(Long noticeId)
    {
        return wcfNoticeManageMapper.deleteWcfNoticeManageByNoticeId(noticeId);
    }
}
